# ================================================================================== #
# Complaints About Police Misconduct Have Adverse Effects for Black Civilians (PSRM)
# - Script: Appendix D (Full Tables of Model Estimates)
# - Author: Patrick Kraft (patrickwilli.kraft@uc3m.es)
# ================================================================================== #


# Load raw data, packages, and custom functions ---------------------------

source(here::here("00-func.R"))
load(here("sqf_ccrb.Rdata"))
load(here("out/results.Rdata"))


# Figure 2: VAR effects of CCRB complaints on subsequent SQF --------------

latexVAR(m2[[1]], caption="Vector autoregression of monthly changes in total SQF incidents,  
         monthly changes in total CCRB complaints, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 2 in the main text.", 
         label="tab:total", align="lccc", 
         mlabs=list(sqf_d="SQF (1000s)", ccrb_d="CCRB (100s)", 
                    arrests_d="Arrests (1000s)"), 
         varlabs=list(ccrb_d.l1="CCRB Lag 1", 
                      ccrb_d.l2="CCRB Lag 2", 
                      ccrb_d.l3="CCRB Lag 3", 
                      ccrb_d.l4="CCRB Lag 4", 
                      sqf_d.l1="SQF Lag 1", 
                      sqf_d.l2="SQF Lag 2", 
                      sqf_d.l3="SQF Lag 3", 
                      sqf_d.l4="SQF Lag 4", 
                      arrests_d.l1="Arrests Lag 1", 
                      arrests_d.l2="Arrests Lag 2", 
                      arrests_d.l3="Arrests Lag 3", 
                      arrests_d.l4="Arrests Lag 4", 
                      media_d="Media Coverage", 
                      unemp_d="Unemplyment", 
                      visit_overseas_d="Overseas Arrivals", 
                      temp_mean="Mean Temperature", 
                      precip_total="Precipitation", 
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD01_total.tex")

latexVAR(m2[[2]], caption="Vector autoregression of monthly changes in SQF incidents involving whites,  
         monthly changes in CCRB complaints by whites, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 2 in the main text.", 
         label="tab:white", align="lccc", 
         mlabs=list(sqf_d="SQF (1000s)", ccrb_d="CCRB (100s)", 
                    arrests_d="Arrests (1000s)"), 
         varlabs=list(ccrb_d.l1="CCRB Lag 1", 
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      sqf_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD02_white.tex")

latexVAR(m2[[3]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks,  
         monthly changes in CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 2 in the main text.",
         label="tab:black", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      sqf_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD03_black.tex")

latexVAR(m2[[4]], caption="Vector autoregression of monthly changes in SQF incidents involving Latinos,  
         monthly changes in CCRB complaints by Latinos, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 2 in the main text.",
         label="tab:hispanic", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD04_hispanic.tex")


# Figure 3: VAR effects by officer race (black suspects/complainants) --------

latexVAR(m3[[1]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks,  
         monthly changes in CCRB complaints by blacks about non-white officers,
         and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 3 in the main text
         as well as Figure~\\ref{fig:robust_officerrace_black} in the appendix.",
         label="tab:orace_po", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_po_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_po_d.l1="CCRB Lag 1",
                      ccrb_po_d.l2="CCRB Lag 2",
                      ccrb_po_d.l3="CCRB Lag 3",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD05_orace_po.tex")

latexVAR(m3[[2]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks,  
         monthly changes in CCRB complaints by blacks about white officers,
         and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 3 in the main text
         as well as Figure~\\ref{fig:robust_officerrace_black} in the appendix.",
         label="tab:orace_pw", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_pw_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_pw_d.l1="CCRB Lag 1",
                      ccrb_pw_d.l2="CCRB Lag 2",
                      ccrb_pw_d.l3="CCRB Lag 3",
                      ccrb_pw_d.l4="CCRB Lag 4",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      sqf_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD06_orace_pw.tex")


# Figure 4: Officer knowledge & case disposition (black suspects/complainants) --------

latexVAR(m4[[1]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks,  
         monthly changes in CCRB complaints by blacks that did not involve officer contact,
         and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 4 in the main text.",
         label="tab:subst1", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_subst1_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_subst1_d.l1="CCRB Lag 1",
                      ccrb_subst1_d.l2="CCRB Lag 2",
                      ccrb_subst1_d.l3="CCRB Lag 3",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD07_subst1.tex")

latexVAR(m4[[2]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks,  
         monthly changes in unsubstantiated CCRB complaints by blacks,
         and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 4 in the main text.",
         label="tab:subst2", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_subst2_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_subst2_d.l1="CCRB Lag 1",
                      ccrb_subst2_d.l2="CCRB Lag 2",
                      ccrb_subst2_d.l3="CCRB Lag 3",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD08_subst2.tex")

latexVAR(m4[[3]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks,  
         monthly changes in substantiated CCRB complaints by blacks,
         and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 4 in the main text.",
         label="tab:subst3", align="lccc",
         mlabs=list(sqf_d="SQF (1000s)", ccrb_subst3_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_subst3_d.l1="CCRB Lag 1",
                      ccrb_subst3_d.l2="CCRB Lag 2",
                      ccrb_subst3_d.l3="CCRB Lag 3",
                      sqf_d.l1="SQF Lag 1",
                      sqf_d.l2="SQF Lag 2",
                      sqf_d.l3="SQF Lag 3",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD09_subst3.tex")


# Figure 5: Officer discretion for stop (black suspects/complainants) --------

latexVAR(m5[[1]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         without an ongoing investigation,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:invest0", align="lccc",
         mlabs=list(sqf_invest0_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_invest0_d.l1="SQF Lag 1",
                      sqf_invest0_d.l2="SQF Lag 2",
                      sqf_invest0_d.l3="SQF Lag 3",
                      sqf_invest0_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD10_invest0.tex")

latexVAR(m5[[2]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         in the context of an ongoing investigation,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:invest1", align="lccc",
         mlabs=list(sqf_invest1_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_invest1_d.l1="SQF Lag 1",
                      sqf_invest1_d.l2="SQF Lag 2",
                      sqf_invest1_d.l3="SQF Lag 3",
                      sqf_invest1_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD11_invest1.tex")

latexVAR(m5[[3]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         without a report by a witness/victim,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:report0", align="lccc",
         mlabs=list(sqf_report0_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_report0_d.l1="SQF Lag 1",
                      sqf_report0_d.l2="SQF Lag 2",
                      sqf_report0_d.l3="SQF Lag 3",
                      sqf_report0_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD12_report0.tex")

latexVAR(m5[[4]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         due to a report by a victim/witness,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:report1", align="lccc",
         mlabs=list(sqf_report1_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_report1_d.l1="SQF Lag 1",
                      sqf_report1_d.l2="SQF Lag 2",
                      sqf_report1_d.l3="SQF Lag 3",
                      sqf_report1_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD13_report1.tex")

latexVAR(m5[[5]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         not in the proximity of a scene of offense,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:proxim0", align="lccc",
         mlabs=list(sqf_proxim0_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_proxim0_d.l1="SQF Lag 1",
                      sqf_proxim0_d.l2="SQF Lag 2",
                      sqf_proxim0_d.l3="SQF Lag 3",
                      sqf_proxim0_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD14_proxim0.tex")

latexVAR(m5[[6]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         in the proximity of a scene of offense,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:proxim1", align="lccc",
         mlabs=list(sqf_proxim1_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_proxim1_d.l1="SQF Lag 1",
                      sqf_proxim1_d.l2="SQF Lag 2",
                      sqf_proxim1_d.l3="SQF Lag 3",
                      sqf_proxim1_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD15_proxim1.tex")

latexVAR(m5[[7]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         where no violent crime was observed,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:vcrime_cs0", align="lccc",
         mlabs=list(sqf_vcrime_cs0_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_vcrime_cs0_d.l1="SQF Lag 1",
                      sqf_vcrime_cs0_d.l2="SQF Lag 2",
                      sqf_vcrime_cs0_d.l3="SQF Lag 3",
                      sqf_vcrime_cs0_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD16_vcrime_cs0.tex")

latexVAR(m5[[8]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         where a violent crime was observed,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:vcrime_cs1", align="lccc",
         mlabs=list(sqf_vcrime_cs1_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_vcrime_cs1_d.l1="SQF Lag 1",
                      sqf_vcrime_cs1_d.l2="SQF Lag 2",
                      sqf_vcrime_cs1_d.l3="SQF Lag 3",
                      sqf_vcrime_cs1_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD17_vcrime_cs1.tex")

latexVAR(m5[[9]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         without signs or sounds of a criminal activity,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:sights0", align="lccc",
         mlabs=list(sqf_sights0_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_sights0_d.l1="SQF Lag 1",
                      sqf_sights0_d.l2="SQF Lag 2",
                      sqf_sights0_d.l3="SQF Lag 3",
                      sqf_sights0_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD18_sights0.tex")

latexVAR(m5[[10]], caption="Vector autoregression of monthly changes in SQF incidents involving blacks
         due to signs or sounds of a criminal activity,  
         monthly changes in total CCRB complaints by blacks, and monthly changes in total arrests
         (standard errors in parentheses). Estimates are used for Figure 5 in the main text.",
         label="tab:sights1", align="lccc",
         mlabs=list(sqf_sights1_d="SQF (1000s)", ccrb_d="CCRB (100s)",
                    arrests_d="Arrests (1000s)"),
         varlabs=list(ccrb_d.l1="CCRB Lag 1",
                      ccrb_d.l2="CCRB Lag 2",
                      ccrb_d.l3="CCRB Lag 3",
                      ccrb_d.l4="CCRB Lag 4",
                      sqf_sights1_d.l1="SQF Lag 1",
                      sqf_sights1_d.l2="SQF Lag 2",
                      sqf_sights1_d.l3="SQF Lag 3",
                      sqf_sights1_d.l4="SQF Lag 4",
                      arrests_d.l1="Arrests Lag 1",
                      arrests_d.l2="Arrests Lag 2",
                      arrests_d.l3="Arrests Lag 3",
                      arrests_d.l4="Arrests Lag 4",
                      media_d="Media Coverage",
                      unemp_d="Unemplyment",
                      visit_overseas_d="Overseas Arrivals",
                      temp_mean="Mean Temperature",
                      precip_total="Precipitation",
                      jan="January",
                      const="Intercept"),
         table.placement="ht", caption.placement="top", size="tiny",
         file="out/tabD19_sights1.tex")

